<template>
    <a-drawer width="100%" :body-style="{ paddingBottom: '80px', background: '#f0f2f5' }" :width="1000"
        :visible="isShow" placement="right" :get-container="false"  :style="{ position: 'absolute'}"  :closable="false"
        :footer-style="{ textAlign: 'right' }">
        <a-card class="mb-2">
            <a-row :gutter="24" class="text-center">
                <a-col :span="20">
                    <!-- <div class=" mb-4 text-left font-semibold  text-lg ml-6 flex flex-row "  style="font-size: 16px;">

                        <span style="font-weight: bold;" class="mr-4"> {{ info.name }}</span>
                        合同编号：{{ info.code }}
                      
                    </div> -->
                    <div class="flex flex-row">
                        <div class="w-32 ">
                            <div class="mb-2">供应商名称</div>
                            <div style="font-weight: 600;">{{ info.supplierName }}</div>
                        </div>
                        <div class="w-48 ">
                            <div class="mb-2">合同金额</div>
                            <div style="font-weight: 600;"> {{ info.amount }} </div>
                        </div>
                        <div class="w-48 ">
                            <div class="mb-2">已付款金额</div>
                            <div style="font-weight: 600;"> {{ info.amount }} </div>
                        </div>
                      
                        <div class="w-32   ">
                            <div class="mb-2">预算剩余金额</div>
                            <div style="font-weight: 600;"> {{ info.budgetRemain }}</div>
                        </div>
                      
                    </div>
                </a-col>
                <a-col class="text-right" :span="4">
                    <a-button @click="isShow = false">返回</a-button>
                </a-col>
            </a-row>
        </a-card>
        <a-card class="mb-2">
            <a-tabs>
                <a-tab-pane key="1" tab="详细信息">
                    <edit ref="editRef" :disabled="true"></edit>
                </a-tab-pane>
                <a-tab-pane key="2" tab="付款纪录">
                    <supplementContract :id="id"></supplementContract>
                </a-tab-pane>
                <a-tab-pane key="3" tab="收票纪录">
                    <paymentCollection :id="id"></paymentCollection>
                </a-tab-pane>

                <a-tab-pane key="5" tab="审核流程">

                    <taskInfo :id="info.processId">
                    </taskInfo>
                </a-tab-pane>
            </a-tabs> </a-card>
    </a-drawer>
</template>
<script setup>
import taskInfo from '@/components/Task/info.vue'
// import edit from './edit.vue';
import edit from '@/views/flw/customform/contract/components/supplement/edit.vue';
import supplementContract from './supplementContract.vue';
import paymentRecords from './paymentRecords.vue';
import paymentCollection from './paymentCollection.vue';
const editRef = ref()
const info = ref({})
const isShow = ref(false)
const show = (record) => {
    isShow.value = true
    info.value = { ...record }
    editRef.value.show(record)
}
defineExpose({
    show
});
</script>